package edu.vt.ece.rt.benchmark.intruder;

import java.io.Serializable;

import edu.vt.ece.rt.dstm.QObject;


public class Packet implements Comparable<Packet>,Serializable{

	Integer flowId;
	long fragmentId;
	long numFragment;
	long length;
	String data;
	static int PACKET_HEADER_LENGTH = 4;


	long
	packet_compareFlowId (Packet aPtr, Packet bPtr)
	{
		Packet aPacketPtr = aPtr;
		Packet bPacketPtr = bPtr;

		return (aPacketPtr.flowId - bPacketPtr.flowId);
	}

	long
	packet_compareFragmentId (Packet aPtr, Packet bPtr)
	{
		Packet aPacketPtr = (Packet)aPtr;
		Packet bPacketPtr = (Packet)bPtr;

		return (int)(aPacketPtr.fragmentId - bPacketPtr.fragmentId);
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}


	@Override
	public int compareTo(Packet arg0) {
		return (int)(this.fragmentId - arg0.fragmentId);
	}



//	@Override
//	public QObject clone() {
//		// TODO Auto-generated method stub
//		return this;
//	}
//
//	@Override
//	public String getId() {
//		// TODO Auto-generated method stub
//		return null;
//	}

}
